package com.stark.lock.boot.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 分布式锁配置项
 *
 * @author <a href="mailto:mengbin@hotmail.com">Ben</a>
 * @version 1.0.0
 * @since 1.0.0
 */
@Data
@ConfigurationProperties(prefix = "spring.lock")
public class DistributedLockProperties {

    /**
     * redis 分布式锁配置
     */
    private RedisDistributedLockProperties redis = new RedisDistributedLockProperties();

    @Data
    public static class RedisDistributedLockProperties {

        /**
         * 命名空间
         */
        private String cacheName;

        /**
         * 占锁超时毫秒数
         */
        private long timeout;

    }

}
